package com.hornsun.medicine.API;

import com.hornsun.domain.dbo.Medicine;
import org.springframework.web.bind.annotation.*;

import java.util.UUID;

/**
 * Created by 编译中... on 2018/1/29.
 */
@RestController
@RequestMapping("/api/medicine")
public class MedicineAPI {
    /**
     * 增加药品信息
     * @param medicine
     */
    @PostMapping("/addMedicine")
    public void addMedicine(@RequestParam Medicine medicine){
        medicine.setMedicineGuid(UUID.randomUUID().toString());

    }

    /**
     * 修改药品信息
     * @param medicine
     */
    @PostMapping("/updateMedicine")
    public void updateMedicine(@RequestParam Medicine medicine){
    }

    /**
     * 删除药品信息
     */
    @PostMapping("/deleteMedicine")
    public void deleteMedicine(){
    }

    /**
     * 查询药品信息
     * @param name
     * @return
     */
    @GetMapping("/queryMedicine")
    public Medicine queryMedicine(@RequestParam String name){
        return null;
    }

}
